<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<style type="text/css">
.page .show_e select{line-height:16px; padding:5px; border:1px solid #e1e1e1; text-align:center; color:#f35e0b; margin:0 2px;}
</style>

<script type="text/javascript">
//跳转到多少页
function btnSubmitPage(item){
	var currentPage = $('#currentPage');
	var totalPage = $('#totalPage');
	
	if(!/^[0-9]*$/.test(currentPage.val())){
		currentPage.val(1);
	}else if(currentPage.val()<1){
		currentPage.val(1);
	}else if(parseInt(currentPage.val()) > parseInt(totalPage.val())){
		currentPage.val(totalPage.val());
	}
	
	submitPage(null,item);
}
//搜索表单提交
function submitPage(val,item){
	if(val){
		$('#currentPage').val(val);
	}
	$(item).parents('form').submit();
}

</script>
<div class="tab_bot" style="margin: 5px 0 0px">
	<div class="page">
		<div class="show_e">
			<input id="totalPage" style="display: none;" value="${result.totalPage}"/>
			<span>共${result.totalRecord}条&nbsp;&nbsp;&nbsp;第${result.currentPage}/${result.totalPage}页</span>
			<span>每页显示<select id="pageSize" name="pageSize" onchange="submitPage(1,this);">
				<option <c:if test="${result.pageSize==5 }">selected="selected"</c:if> >5</option>
				<option <c:if test="${result.pageSize==10 }">selected="selected"</c:if> >10</option>
				<option <c:if test="${result.pageSize==20 }">selected="selected"</c:if> >20</option>
				<option <c:if test="${result.pageSize==50 }">selected="selected"</c:if> >50</option>
				<c:if test="${result.pageSize !=5 && result.pageSize !=10 && result.pageSize !=20 && result.pageSize !=50 }">
				<option selected="selected">${result.pageSize }</option>
				</c:if>
				</select>
			</span>
			<c:if test="${result.currentPage > 1}">
			<a href="javascript:void(0);" onclick="submitPage(1,this);">首页</a>
			<a href="javascript:void(0);" onclick="submitPage(${result.currentPage-1},this);">上一页</a>
			</c:if>
			<c:if test="${result.currentPage < result.totalPage}">
			<a href="javascript:void(0);" onclick="submitPage(${result.currentPage+1},this);">下一页</a>
			<a href="javascript:void(0);" onclick="submitPage(${result.totalPage},this);">尾页</a>
			</c:if>
			<span>跳转至<input id="currentPage" name="currentPage" value="${result.currentPage}" class="utilInteger"/>页</span>
		</div>
		<span class="combtn"><a href="javascript:void(0);" onclick="btnSubmitPage(this);">确定</a></span>
	</div>
</div>
